﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace eLoan.Models
{
    [Table("LoanCoMaker")]
    public class LoanCoMaker : LoanCoMakerFields
    { }

    public class LoanCoMakerModel
    {
        public LoanCoMaker LoanCoMaker { get; set; }

        public string DBCommand { get; set; }

        public string DocumentNo { get; set; }

        public int BorrowerID { get; set; }

        public string BorrowerName { get; set; }

        public string BranchCode { get; set; }
    }

    public class LoanCoMakerFields
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        [Display(Name = "ID")]
        public int ID { get; set; }

        [Required]
        [Display(Name = "Document No")]
        [StringLength(50)]
        public string DocumentNo { get; set; }

        [Required]
        [Display(Name = "Co-Maker Name")]
        [StringLength(100)]
        public string CoMakerName { get; set; }

        [Required]
        [Display(Name = "Address")]
        [StringLength(200)]
        public string Address { get; set; }

        [Required]
        [Display(Name = "Contact Numbers")]
        [StringLength(200)]
        public string ContactNumbers { get; set; }

        [Required]
        [Display(Name = "ID No")]
        [StringLength(100)]
        public string IDNo { get; set; }
    }

}